package com.wyyc.entity;

import javax.persistence.*;
import java.sql.Date;
import java.sql.Timestamp;

/**
 * Created by Hwei~ on 2017/6/5.
 */
@Entity
@Table(name = "my_car", schema = "", catalog = "db_wycar")
public class MyCarEntity {
    private int id;
    private Integer userId;
    private String hphm;
    private String hpzl;
    private String engineno;
    private String classno;
    private Date addate;
    private Timestamp createTime;
    private String phone;
    private String owner;
    private Integer illegal;
    private Double money;
    private Integer fen;
    private String cityCode;

    @Id
    @Column(name = "id")
    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    @Basic
    @Column(name = "userId")
    public Integer getUserId() {
        return userId;
    }

    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    @Basic
    @Column(name = "hphm")
    public String getHphm() {
        return hphm;
    }

    public void setHphm(String hphm) {
        this.hphm = hphm;
    }

    @Basic
    @Column(name = "hpzl")
    public String getHpzl() {
        return hpzl;
    }

    public void setHpzl(String hpzl) {
        this.hpzl = hpzl;
    }

    @Basic
    @Column(name = "engineno")
    public String getEngineno() {
        return engineno;
    }

    public void setEngineno(String engineno) {
        this.engineno = engineno;
    }

    @Basic
    @Column(name = "classno")
    public String getClassno() {
        return classno;
    }

    public void setClassno(String classno) {
        this.classno = classno;
    }

    @Basic
    @Column(name = "addate")
    public Date getAddate() {
        return addate;
    }

    public void setAddate(Date addate) {
        this.addate = addate;
    }

    @Basic
    @Column(name = "createTime")
    public Timestamp getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Timestamp createTime) {
        this.createTime = createTime;
    }

    @Basic
    @Column(name = "phone")
    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    @Basic
    @Column(name = "owner")
    public String getOwner() {
        return owner;
    }

    public void setOwner(String owner) {
        this.owner = owner;
    }

    @Basic
    @Column(name = "illegal")
    public Integer getIllegal() {
        return illegal;
    }

    public void setIllegal(Integer illegal) {
        this.illegal = illegal;
    }

    @Basic
    @Column(name = "money")
    public Double getMoney() {
        return money;
    }

    public void setMoney(Double money) {
        this.money = money;
    }

    @Basic
    @Column(name = "fen")
    public Integer getFen() {
        return fen;
    }

    public void setFen(Integer fen) {
        this.fen = fen;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        MyCarEntity that = (MyCarEntity) o;

        if (id != that.id) return false;
        if (addate != null ? !addate.equals(that.addate) : that.addate != null) return false;
        if (classno != null ? !classno.equals(that.classno) : that.classno != null) return false;
        if (createTime != null ? !createTime.equals(that.createTime) : that.createTime != null) return false;
        if (engineno != null ? !engineno.equals(that.engineno) : that.engineno != null) return false;
        if (fen != null ? !fen.equals(that.fen) : that.fen != null) return false;
        if (hphm != null ? !hphm.equals(that.hphm) : that.hphm != null) return false;
        if (hpzl != null ? !hpzl.equals(that.hpzl) : that.hpzl != null) return false;
        if (illegal != null ? !illegal.equals(that.illegal) : that.illegal != null) return false;
        if (money != null ? !money.equals(that.money) : that.money != null) return false;
        if (owner != null ? !owner.equals(that.owner) : that.owner != null) return false;
        if (phone != null ? !phone.equals(that.phone) : that.phone != null) return false;
        if (userId != null ? !userId.equals(that.userId) : that.userId != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = id;
        result = 31 * result + (userId != null ? userId.hashCode() : 0);
        result = 31 * result + (hphm != null ? hphm.hashCode() : 0);
        result = 31 * result + (hpzl != null ? hpzl.hashCode() : 0);
        result = 31 * result + (engineno != null ? engineno.hashCode() : 0);
        result = 31 * result + (classno != null ? classno.hashCode() : 0);
        result = 31 * result + (addate != null ? addate.hashCode() : 0);
        result = 31 * result + (createTime != null ? createTime.hashCode() : 0);
        result = 31 * result + (phone != null ? phone.hashCode() : 0);
        result = 31 * result + (owner != null ? owner.hashCode() : 0);
        result = 31 * result + (illegal != null ? illegal.hashCode() : 0);
        result = 31 * result + (money != null ? money.hashCode() : 0);
        result = 31 * result + (fen != null ? fen.hashCode() : 0);
        return result;
    }

    @Basic
    @Column(name = "cityCode")
    public String getCityCode() {
        return cityCode;
    }

    public void setCityCode(String cityCode) {
        this.cityCode = cityCode;
    }
}
